﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;

namespace XRpgLibrary.TileEngine
{
    public class AnimatedTile : Tile
    {
        #region Field Region
            
        TileAnimation animation;
        
        #endregion
            
        #region Property Region
            
        public override int TileIndex
        {
            get 
            { 
                return animation.CurrentTileIndex; 
            }
            set
            {
                 
            }
        }
            
        #endregion
            
        #region Constructor Region
            
        public AnimatedTile(TileAnimation animation)
            : base(-1)
        {
            this.animation = animation;
        }
        
        #endregion

        public AnimatedTile Clone()
        { 
            return new AnimatedTile(animation.Clone());
        }

        public override string ToString()
        {
            return TileIndex + "a";
        }
    }
}
